using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;

using Com.Grubbland.Data.Objects;
using Com.Grubbland.Data.Access;


/// <summary>
/// Summary description for MediaBuilderService
/// </summary>
[WebService(Namespace = "http://eelms.grubbland.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MediaBuilderService : System.Web.Services.WebService
{

    MediaBuilderServiceImpl _svc = new MediaBuilderServiceImpl();
    DirectoryServiceImpl _dsvc = new DirectoryServiceImpl();

    public MediaBuilderService()
    {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld( List<DirectoryItem> tmp )
    {
        return "Hello World";
    }

    [WebMethod]
    public String SaveProject( Project p, DirectoryItem d )
    {
        return _svc.SaveProject(p,d);
    }

    [WebMethod]
    public bool UpdateProject(Project p)
    {
        return _svc.UpdateProject(p);
    }

    [WebMethod]
    public Project OpenProject(string projectId, string creatorId )
    {
        return _svc.OpenProject(projectId, creatorId);
    }

    [WebMethod]
    public DirectoryItem GetDirectoryNode(string dirId, string userId, bool subdirs, int count)
    {
        return _dsvc.GetDirectoryNode(dirId, userId, subdirs, count);
    }

    [WebMethod]
    public DirectoryItem GetDirectoryInfo(string dirId )
    {
        return _dsvc.GetDirectoryInfo(dirId );
    }

    [WebMethod]
    public string SaveDirectoryReference( DirectoryItem di )
    {
        return _dsvc.SaveDirectoryReference(di);
    }

    [WebMethod]
    public bool DeleteDirectoryReference(String dirId, String userName)
    {
        return _dsvc.DeleteDirectoryReference(dirId,userName);
    }

    [WebMethod]
    public DirectoryItem CreateFolder(DirectoryItem di)
    {
        return _dsvc.CreateFolder(di);
    }

}

